#define DEBUG
#include <cstdio>
#include <algorithm>

using namespace std;

const int maxn=2000;

int main() {
  freopen("vote.in", "r", stdin);
  freopen("vote.out", "w", stdout);

  static long double p[maxn+1];
  int n, k;
  scanf("%d %d", &n, &k);
  for (int i=1; i<=n; i++) {
    scanf("%LF", p+i);
  }
  sort(p+1, p+n+1);

  static long double f[maxn+1][maxn+1], g[maxn+2][maxn+1];
  f[0][0] = 1;
  for (int i=1; i<=n; i++) {
    for (int j=1; j<=i; j++) {
      f[i][j] = f[i-1][j]*(1-p[i])+f[i-1][j-1]*p[i];
    }
    f[i][0] = f[i-1][0]*(1-p[i]);
  }
  g[n+1][0] = 1;
  for (int i=n; i>0; i--) {
    for (int j=1; j<=n; j++) {
      g[i][j] = g[i+1][j]*(1-p[i])+g[i+1][j-1]*p[i];
    }
    g[i][0] = g[i+1][0]*(1-p[i]);
  }

  long double ans=0;
  for (int i=0; i<=k; i++) {
    long double now=0;
    for (int j=0; j<=k/2; j++) {
      now += f[i][j]*g[n-(k-i)+1][k/2-j];
    }
    ans = max(ans, now);
  }
  printf("%.6LF", ans);

  fclose(stdin);
  fclose(stdout);
  return 0;
}
